{% extends "account/base.html" %}

{% load i18n %}
{% load bootstrap_tags %}
{% load account socialaccount %}

{% block title %}{% trans "Sign up" %}{% endblock %}

{% block body_outer %}
    <div class="page-header">
        <h2>{% trans "Sign up" %}</h2>
    </div>
    <div class="row">
      {% get_providers as socialaccount_providers %}
      {% if socialaccount_providers %}
          <p>{% blocktrans with site.name as site_name %}Sign up with one
              of your existing third party accounts{% endblocktrans %}</p>
          {% include "socialaccount/snippets/provider_list.html" with process="signup" %}
          {% include "socialaccount/snippets/login_extra.html" %}
          <hr>
      {% endif %}
    </div>
    {% if account_geonode_local_signup %}
        <div class="row">
          <p>{% trans "Create a new local account" %}</p>
          <form id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
              <fieldset>
                  {% csrf_token %}
                  {{ form|as_bootstrap }}
                  {% if redirect_field_value %}
                      <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
                  {% endif %}
                  <div class="form-actions">
                      <button type="submit" class="btn btn-primary">{% trans "Sign up" %}</button>
                  </div>
              </fieldset>
          </form>
        </div>
    {% endif %}
{% endblock %}

{% block extra_script %}
    {{ block.super }}
    <script type="text/javascript">
        $(document).ready(function() {
            $('#id_username').focus();
        });
    </script>
{% endblock %}
